// type aliase 类型别名
let sum: (x: number, y: number) => number
type PlusType = (x: number, y: number) => number
let sum2: PlusType

type StrOrNumber = string | number
let result3: StrOrNumber =  '123'
result3 = 123

type Directions = 'Up' | 'Down' | 'Left' | 'Right'
let toWhere: Directions = 'Left'

interface IName {
    name: string
}
type IPerson = IName & { age: number }
let person: IPerson = { name: '123', age: 123 }